//
//  BodyGV.swift
//  demo01
//
//  Created by babybus on 2025/7/7.
//
import Foundation
import UIKit
import SnapKit
import Alamofire

class BodyGVView:UIView{
    //全局变量
    private var backgroundImg:UIImageView!
    private var headView:BodyHeadGVView!
    private var bodyMain:BodyMainGVView!
    //初始化方法
    override init(frame: CGRect) {
        super.init(frame: frame)
        attributeInit()
        setupUI()
    }
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    func attributeInit(){
        
    }
    func setupUI(){
        backgroundImg = UIImageView(image: UIImage(named: "sea.png"))
        headView = BodyHeadGVView()
        bodyMain = BodyMainGVView()
        
        self.addSubview(backgroundImg)
        self.addSubview(headView)
        self.addSubview(bodyMain)
        
        backgroundImg.snp.makeConstraints { make in
            make.width.height.equalToSuperview()
        }
        headView.snp.makeConstraints { make in
            make.width.equalToSuperview()
            make.height.equalTo(98)
            make.top.equalToSuperview()
        }
        bodyMain.snp.makeConstraints { make in
            make.width.equalToSuperview()
            make.height.equalTo(362)
            make.top.equalTo(headView.snp.bottom)
            
        }
    }
}
